#include <stdint.h>
typedef struct {
    uint32_t valid_bit;
    uint32_t tag;
    uint8_t data[64];
} CacheLine;

//64kb cache
#define CACHE_SIZE 64*1024
#define CACHE_LINE_SIZE 64
#define CACHE_WAY_SIZE 8
#define CACHE_WAY_NUM 64
#define CACHE_SET_NUM 128
#define CACHE_SET_SIZE 8


CacheLine cache[CACHE_SET_NUM][CACHE_WAY_NUM];
typedef struct {
    uint8_t data[64];
} mem_cacheline;
void init_cache() ;
uint32_t cache_read( uint32_t addr, mem_cacheline *data) ;


void cache_write(uint32_t addr, mem_cacheline *data) ;